﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Net;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Soap;

namespace Swaf.Remoting
{
	public class FlexiTypeMethodCallMessage : IMethodCallMessage
	{
		protected IMethodCallMessage m_inner;

		public FlexiTypeMethodCallMessage(IMethodCallMessage inner)
		{
			m_inner = inner;
		}

		#region IMethodCallMessage Members

		public object GetInArg(int argNum)
		{
			return m_inner.GetInArg(argNum);
		}

		public string GetInArgName(int index)
		{
			return m_inner.GetInArgName(index);
		}

		public int InArgCount
		{
			get { return m_inner.InArgCount; }
		}

		public object[] InArgs
		{
			get { return m_inner.InArgs; }
		}

		#endregion

		#region IMethodMessage Members

		public int ArgCount
		{
			get { return m_inner.ArgCount; }
		}

		public object[] Args
		{
			get { return m_inner.Args; }
		}

		public object GetArg(int argNum)
		{
			return m_inner.GetArg(argNum);
		}

		public string GetArgName(int index)
		{
			return m_inner.GetArgName(index);
		}

		public bool HasVarArgs
		{
			get { return m_inner.HasVarArgs; }
		}

		public LogicalCallContext LogicalCallContext
		{
			get { return m_inner.LogicalCallContext; }
		}

		public System.Reflection.MethodBase MethodBase
		{
			get { return m_inner.MethodBase; }
		}

		public string MethodName
		{
			get { return m_inner.MethodName; }
		}

		public object MethodSignature
		{
			get { return m_inner.MethodSignature; }
		}

		public string TypeName
		{
			get 
			{
				string tname = m_inner.TypeName;
				return tname;
			}
		}

		public string Uri
		{
			get { return m_inner.Uri; }
		}

		#endregion

		#region IMessage Members

		public IDictionary Properties
		{
			get { return m_inner.Properties; }
		}

		#endregion
	}
}
